home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 7 / 007.d81 / header changer (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  89 lines

  1. 1 n$="[163][183][184][162][185][175][164][163][183][184][162][185][175][164]"
  2. 2 printchr$(14)
  3. 3 gosub 1000
  4. 5 dimse%(256)
  5. 10 ch=8:dr=0
  6. 15 z$=chr$(0)
  7. 17 poke198,0
  8. 18 print"[147][201]nsert the correct disk & press a key":poke198,0:wait198,1
  9. 19 getk$
  10. 20 open15,8,15
  11. 30 open8,8,8,"#"
  12. 32 print#15,"b-p:";8;0
  13. 45 print#15,"u1:";ch;dr;18;0
  14. 50 input#15,a,a$,b$,c$
  15. 60 :
  16. 62 ifa<>0thenprint"[217]ou just had a disk error!"
  17. 70 ifa<>0thenprinta,a$,b$,c$:close8:close15:goto18
  18. 80 forx=0to255:get#8,a$
  19. 90 se%(x)=asc(a$+z$)
  20. 100 print".";:next
  21. 110 print"[147]disk name = ";
  22. 120 forx=144to161:printchr$(se%(x));:next
  23. 130 print
  24. 135 print"id        = ";
  25. 140 printchr$(se%(162))chr$(se%(163))
  26. 150 print
  27. 160 input"new header                    [157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157][157]";h$
  28. 170 iflen(h$)<0orlen(h$)>16thenprint"[145]";:goto160
  29. 200 print:print:print"all this o.k.?":poke198,0:wait198,1:getk$:ifk$<>"y"andk$<>"n"then200
  30. 210 ifk$="n"then150
  31. 220 forx=1tolen(h$)
  32. 230 se%(x+143)=asc(mid$(h$,x,1))
  33. 240 next
  34. 245 :
  35. 250 if144+len(h$)<161thenforx=144+len(h$)to161:se%(x)=160:next
  36. 260 :
  37. 270 rem     se%(162)=asc(left$(id$,1))
  38. 280 rem     se%(163)=asc(right$(id$,1))
  39. 290 :
  40. 300 print#15,"b-p:";8;0
  41. 310 forx=0to255
  42. 320 print#8,chr$(se%(x));:print".";
  43. 330 nextx
  44. 332 print
  45. 340 :
  46. 350 print#15,"u2:";ch;dr;18;0
  47. 355 input#15,a,a$,b$,c$
  48. 356 printa,a$,b$,c$
  49. 560 poke783,peek(783)and254
  50. 570 poke781,24:poke782,13:sys65520
  51. 580 print"<another disk?>"
  52. 585 print#15,"i0"
  53. 590 poke198,0:wait198,1:geta$:ifa$="y"then:close8:close15:goto17
  54. 600 close8:close15
  55. 700 goto63000
  56. 1000 print"[147]":poke53281,0:poke53280,6:print""
  57. 1010 print:print:print:print"            [200][197][193][196][197][210][160][195][200][193][206][199][197][210]"
  58. 1020 print:print:print:print"                  by"
  59. 1030 print:print:print:print"             [193]lan [199]ardner"
  60. 1032 print"              [195]irca 1984"
  61. 1040 gosub2000
  62. 1050 :                                       
  63. 1060 print"[147]  [206]ow you can change the header on any":print
  64. 1070 print"of your disks.  ":print:print
  65. 1080 print"  [212]he program will read in the original":print
  66. 1090 print"header and id and print these out.  [217]ou":print
  67. 1100 print"will then be prompted for a new header.":print
  68. 1110 print"  [193]fter entering this you will be ":print
  69. 1120 print"asked if your input is o.k.  [201]f not, ":print
  70. 1130 print"you can change it again.  [201]f your":print
  71. 1140 print"input is o.k. it will then change the ":print
  72. 1150 print"header on your disk."
  73. 1160 gosub2000
  74. 1170 :
  75. 1200 return
  76. 2000 rem   <press a key> stuff
  77. 2010 poke783,peek(783)and254
  78. 2020 poke781,23:poke782,13:sys65520:print"<press a key>"
  79. 2030 forx=1tolen(n$)
  80. 2032 a$=mid$(n$,x,1):b$=mid$(n$,len(n$)-x+1,1)
  81. 2040 poke781,23:poke782,11:sys65520:printa$
  82. 2045 poke781,23:poke782,28:sys65520:printb$
  83. 2050 nextx
  84. 2060 getk$:ifk$=""then2030
  85. 2070 return
  86. 63000 rem    connect back to l.s.
  87. 63002 print"[147]load"chr$(34)"payload"chr$(34)",8":print"run"
  88. 63004 poke198,0:poke631,13:poke632,13:poke198,2:end
  89.